package com.tarena.day030;

public class IfElseDemo2 {
  public static void main(String[] args) {
    double base = 7.8;
    double rate;
    int years = 8; //年数
    if(years<=1){
      rate = base * (70.0/100);
    }else if(years<=3){
      rate = base * (80D/100);
    }else if(years<=5){
      rate = base * (100D/100);
    }else if(years<=10){
      rate = base * (110D/100);
    }else{
      rate = base * (120D/100);
    }
    System.out.println(rate); 
  }

}
